/*
 * aboutUs 关于我们
 */
import QtQuick 2.14
import QtQuick.Layouts 1.14
import QtQuick.Controls 2.14
import QtGraphicalEffects 1.14

Item {
    id: root

    /* property 定义开始 */
    property string aboutUsText: "" // 关于我们信息


    // cpp的槽函数
    Connections {
        target: aboutUs
        // 关于我们信息变化的槽函数
        function onAboutUsMessageChanged(aboutUsMsg) {
            root.aboutUsText = aboutUsMsg
            console.log(aboutUsMsg)
        }
    }
    /* property 定义结束 */

    Rectangle {
        id: background
        anchors.fill: parent

        LinearGradient {
            anchors.fill: parent
            start: Qt.point(0, 0)
            end: Qt.point(0, height)
            gradient: Gradient {
                GradientStop {position: 0.0; color: "#FF007BD8"}
                GradientStop {position: 1.0; color: "#FF001A5A"}
            }
        }
    }

    Item {
        id: container
        anchors {
            fill: parent
            margins: 17
        }

        ColumnLayout {
            anchors.fill: parent
            spacing: 17

            // 内容
            Rectangle {
                Layout.fillWidth: true
                Layout.fillHeight: true
                radius: 13
                color: "#C8FFFFFF"

                Label {
                    anchors.fill: parent
                    font.family: "Alibaba PuHuiTi"
                    font.pixelSize: 17
                    color: "#FF222222"
                    text: qsTr(aboutUsText)
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                }
            }

            // 按钮
            BaseButton {
                Layout.fillWidth: true
                Layout.preferredHeight: 42
                btnWidth: width
                btnHeight: height
                btnColor: "#C8FFFFFF"
                btnRadius: 13
                btnLabelWidth: width
                btnLabelHeight: height
                btnText: "返回"
                btnFontPixelSize: 17
                btnFontColor: "#FF222222"
                btnIconWidth: 0
                btnIsIconSquare: true
            }
        }

    }

}
